package com.msw.ssh.model;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by msw on 2015/10/30.
 */


@Entity
@Table(name = "t_user")
@NamedQueries({
    @NamedQuery(name = "finduser", query = "from User u where u.id = :id")
})
public class User implements Serializable {
    @Id
    private String id;
    private String name;
    private String password;

    private Date createTime;
    private Date expireTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }

    @Override
    public String toString() {
        return "User{" +
            "id='" + id + '\'' +
            ", name='" + name + '\'' +
            ", password='" + password + '\'' +
            ", createTime=" + createTime +
            ", expireTime=" + expireTime +
            '}';
    }
}
